const path = require('path')
const CracoLessPlugin = require('craco-less')

const resolve = pathName => path.resolve(__dirname, pathName)
module.exports = {
  webpack: {
    alias: {
      '@': resolve('src') // 别名配置的都是绝对路径
      // '@mui/styled-engine': '@mui/styled-engine-sc'
    }
  },
  plugins: [
    {
      plugin: CracoLessPlugin, // 配置less
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: {},
            javascriptEnabled: true
          }
        }
      }
    }
  ]
}
